.PHONY : all clean winclean doc

packages = ipcards/*.java ipcards/gui/*.java ipcards/net/*.java ipcards/rulesets/*.java
rm_packages = ipcards/*.class ipcards/gui/*.class ipcards/net/*.class ipcards/rulesets/*.class

all :
	javac $(packages)

run : all
	java ipcards.Controller
	
test : all
	java ipcards.Controller &
	java ipcards.Controller localhost 1337

clean :
	rm -rf $(rm_packages)
	rm -rf ../doc

winclean :
	del $(rm_packages)
	del ../doc

docs :
	javadoc -d ../doc $(packages)

jar : all
	jar cvfm IPCards.jar manifest.mf *.class ./decks/PlayingCards/PlayingCards.deck ./decks/PlayingCards/img/*.png ./decks/NoJokers/NoJokers.deck ./decks/NoJokers/img/*.png